import request from '@/utils/request'

// 查询渠道提报二级列表
export function listSecondary(query) {
  return request({
    url: '/productAllocation/secondary/list',
    method: 'get',
    params: query
  })
}
export function selectOrderNumber(query) {
  return request({
    url: '/productAllocation/secondary/selectOrderNumber',
    method: 'get',
    params: query
  })
}
export function selectAllOrderNumber(query) {
  return request({
    url: '/productAllocation/secondary/selectAllOrderNumber',
    method: 'get',
    params: query
  })
}
export function generateOrderNumber(query) {
  return request({
    url: '/productAllocation/secondary/generateOrderNumber',
    method: 'get',
    params: query
  })
}
// 查询渠道提报二级详细
export function getSecondary(id) {
  return request({
    url: '/productAllocation/secondary/' + id,
    method: 'get'
  })
}

// 新增渠道提报二级
export function addSecondary(data) {
  return request({
    url: '/productAllocation/secondary',
    method: 'post',
    data: data
  })
}

// 修改渠道提报二级
export function updateSecondary(data) {
  return request({
    url: '/productAllocation/secondary',
    method: 'put',
    data: data
  })
}
// 修改渠道提报二级
export function editBatch(data) {
  return request({
    url: '/productAllocation/secondary/editBatch',
    method: 'put',
    data: data
  })
}
// 删除渠道提报二级
export function delSecondary(id) {
  return request({
    url: '/productAllocation/secondary/' + id,
    method: 'delete'
  })
}
